import request from '../utils/request.js'

export const serverRegistByPhone = function(data) {
	return request({
		url: '/system/user/regist',
		method: 'POST',
		data
	})
}

export const getServerUserInfo = function(data) {
	return request({
		url: '/port/emp/portEmpInfo',
		method: 'POST',
		data
	})
}

export const webUserInit = function(data) {
	let t = Math.random()
	return request({
		url: `/WF/Comm/ProcessRequest?DoType=WebUser_Init&t=${t}`,
		method: 'POST',
		data
	})
}


export const loginByNo = function(data) {
	return request({
		url: '/port/login/Port_LoginByNo',
		method: 'POST',
		data
	})
}

export const loginByOpenId = function(data) {
	return request({
		url: '/port/login/Port_LoginByWxAppOpenId',
		method: 'POST',
		data
	})
}

export const getUserData = function(data) {
	return request({
		url: '/mp/getUserData',
		method: 'POST',
		data
	})
}

export const loginByAdminAccount = function(data) {
	return request({
		url: '/port/login/Port_LoginByPass',
		method: 'POST',
		data: {
			...data,
		}
	})
}
